﻿@model IEnumerable<PlanificadorDeEventos.Models.Guest>

@{
    ViewBag.Title = "Organizadores";
}

@{
    if (ViewBag.ViewType=="remove")
    {
        <h2>Seleccionar el organizador a eliminar</h2>
    }
    else
	{
        <h2>Seleccionar nuevo organizador</h2>
	}
    
  }



 <table class="bordered">
        <tr>
            <th style="padding-right:15px">
                @Html.DisplayName("Nombre")
            </th>
            <th>
                 @Html.DisplayName("Email")
            </th>
            <th>
                @Html.DisplayName("Acción")
            </th>

        </tr>

    @foreach (var item in Model)
    {
            <tr>
                <td>
                    @item.Nombre
                </td>
                <td>
                    @item.Email
                </td>
              @{  if (Model.Count() != 1)
                  {
                    <td>
                        @Html.ActionLink("Select", (ViewBag.ViewType != "remove") ? "AddOrganizer" : "RemoveOrganizer", new { UserId = item.ID, EventId = ViewBag.EventId }) 
                    </td>
                  }
                  else
                  { 
                      <td>
                    </td>
                  }
                }
            </tr>
    }


</table>
<div style="padding-top:18px">
@Html.ActionLink("Volver", "Edit/" + (int)ViewBag.EventId,null, new { @class = "roundedButton" })
<div>
